home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / TroyReturns.dxr / 00013_Editor BG.ls < prev    next >
Encoding:
Text File  |  2002-01-31  |  624 b   |  29 lines

  1. global editmode, playerViewpoint, screenTileSize, terrainData_Type, textureBrush, mouseinput
  2.  
  3. on mouseUp
  4.   mouseinput = 0
  5. end
  6.  
  7. on mouseDown
  8.   mouseinput = 1
  9.   editmode = #Terrain
  10.   case editmode of
  11.     #Terrain:
  12.       clickTile = ((playerViewpoint + the mouseLoc) / screenTileSize) + 1
  13.       terrainData_Type[clickTile[2]][clickTile[1]] = textureBrush
  14.   end case
  15. end
  16.  
  17. on mouseLeave
  18.   mouseinput = 0
  19. end
  20.  
  21. on mouseWithin
  22.   global coLoc
  23.   clickTile = ((playerViewpoint + the mouseLoc) / screenTileSize) + 1
  24.   if coLoc <> clickTile then
  25.     member("Tile Coordinates").text = string(clickTile)
  26.     coLoc = clickTile
  27.   end if
  28. end
  29.